<?php

namespace App\Library\Requests\Base;

use App\Library\Rules\MediaImgRule;

class ActivityZoneSaveRequest extends BaseDTORequest
{
    public function rules(): array
    {
        return [
            $this->No => 'nullable|string|size:20|regex:' . __('com.numReg'),
            'title' => 'nullable|string|max:255',
            'topFileId' => ['nullable', 'string', 'size:20', 'regex:' . __('com.numReg'), new MediaImgRule],
            'goodsFileId' => ['nullable', 'string', 'size:20', 'regex:' . __('com.numReg'), new MediaImgRule],
            'pageFileId' => ['nullable', 'string', 'size:20', 'regex:' . __('com.numReg'), new MediaImgRule],
            'bannerFileId' => ['nullable', 'string', 'size:20', 'regex:' . __('com.numReg'), new MediaImgRule],
            'pageColor' => 'nullable|string|max:20',
            'tabFontColor' => 'nullable|string|max:20',
            'tabLineColor' => 'nullable|string|max:20',
            'isShow' => 'nullable|integer|in:0,1',
            'type' => 'nullable|string',
            'url' => 'nullable|string',
            'sort' => 'nullable|integer',
        ];
    }
}
